$randomPosts = get_posts(array( 'orderby' => 'rand', 'posts_per_page' => 5, 'tag' => $tag, ));